import Layout from "@/layout/index.vue";
// import Demo from "@/views/demo/index.vue";
import Home from "@/views/home/index.vue";

const routes = [
  {
    path: "/",
    name: "root",
    component: Layout,
    redirect: { name: "Home" },
    children: [
      {
        path: "home",
        name: "Home",
        component: Home,
        meta: {
          title: "主页"
        }
      },
      {
        path: "pledge",
        name: "Pledge",
        component: () => import("@/views/pledge/index.vue"),
        meta: {
          title: "质押"
        }
      },
      {
        path: "revenue",
        name: "Revenue",
        component: () => import("@/views/revenue/index.vue"),
        meta: {
          title: "收益"
        }
      },
      {
        path: "record",
        name: "Record",
        component: () => import("@/views/record/index.vue"),
        meta: {
          title: "记录"
        }
      },
      {
        path: "exchange",
        name: "Exchange",
        component: () => import("@/views/exchange/index.vue"),
        meta: {
          title: "担保交易"
        }
      },
      {
        path: "exchangeRecord",
        name: "ExchangeRecord",
        component: () => import("@/views/exchange/record.vue"),
        meta: {
          title: "担保交易-我的订单"
        }
      },
      {
        path: "transaction",
        name: "Transaction",
        component: () => import("@/views/exchange/transaction.vue"),
        meta: {
          title: "担保交易"
        }
      },
      {
        path: "createOrder",
        name: "CreateOrder",
        component: () => import("@/views/exchange/createOrder.vue"),
        meta: {
          title: "担保交易-创建订单"
        }
      },
      {
        path: "panel",
        name: "Panel",
        component: () => import("@/views/panel/index.vue"),
        meta: {
          title: "仪表盘"
        }
      },
      {
        path: "about",
        name: "About",
        component: () => import("@/views/about/index.vue"),
        meta: {
          title: "关于",
          noCache: true
        }
      },
      {
        path: "bigv",
        name: "Bigv",
        component: () => import("@/views/bigv/index.vue"),
        meta: {
          title: "接口相关调试页面"
        }
      },
      {
        path: "bigv_create_order",
        name: "BigvCreateOrder",
        component: () => import("@/views/bigv/create_order.vue"),
        meta: {
          title: "创建订单"
        }
      }
    ]
  }
];

export default routes;
